package jmu.edu.cn.action;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import jmu.edu.cn.domain.Classroom;
import jmu.edu.cn.domain.Device;
import jmu.edu.cn.domain.DeviceType;
import jmu.edu.cn.domain.Record;
import jmu.edu.cn.service.ClassroomService;
import jmu.edu.cn.service.ClassroomServiceImpl;
import jmu.edu.cn.service.DeviceTypeService;
import jmu.edu.cn.service.DeviceTypeServiceImpl;

public class RecordAction extends ActionSupport {
	private Record record = new Record();
	private List<Record> recList = new ArrayList<Record>();
	private List<Classroom> clsList = new ArrayList<Classroom>();
	private List<DeviceType> typeList = new ArrayList<DeviceType>();
	private List<Device> devList=null;
	private String clsno;
	private String typeno;
	private String orderno;
	
	

	public String getClsno() {
		return clsno;
	}

	public void setClsno(String clsno) {
		this.clsno = clsno;
	}

	public String getTypeno() {
		return typeno;
	}

	public void setTypeno(String typeno) {
		this.typeno = typeno;
	}

	public String getOrderno() {
		return orderno;
	}

	public void setOrderno(String orderno) {
		this.orderno = orderno;
	}

	public Record getRecord() {
		return record;
	}

	public void setRecord(Record record) {
		this.record = record;
	}

	public List<Record> getRecList() {
		return recList;
	}

	public void setRecList(List<Record> recList) {
		this.recList = recList;
	}

	public List<Classroom> getClsList() {
		return clsList;
	}

	public void setClsList(List<Classroom> clsList) {
		this.clsList = clsList;
	}

	public List<DeviceType> getTypeList() {
		return typeList;
	}

	public void setTypeList(List<DeviceType> typeList) {
		this.typeList = typeList;
	}
	
	public List<Device> getDevList() {
		return devList;
	}

	public void setDevList(List<Device> devList) {
		this.devList = devList;
	}

	public String toQuery() throws Exception {
		ClassroomService serviceCls = new ClassroomServiceImpl();
		DeviceTypeService serviceType = new DeviceTypeServiceImpl();
		typeList = serviceType.loadDevType();
		clsList = serviceCls.loadClsroom();
		return "query_page";
	}
	
	public String query() throws Exception{
		
		return null;
	}
}
